import request from '@/utils/request'


// 获取支付方式列表
export function listPayment(query) {
    return request({
        url: '/payment/method/list',
        method: 'get',
        params: query
    })
}
// 新增支付方式
export function addPayment(data) {
    return request({
        url: '/payment/method',
        method: 'POST',
        data: data
    })
}
// 修改支付方式
export function updatePayment(id, data) {
    return request({
        url: '/payment/method/' + id,
        method: 'put',
        data: data
    })
}
//修改支付方式启用状态
export function handleEnabledChange(id, enabled) {
    const data = {
        enabled
    }
    return request({
        url: '/payment/method/' + id + '/enabled',
        method: 'put',
        data: data
    })
}

